
/*

Dofile: table3.do 

Date: Dec. 10, 2016 
Aim: Present additional regressions (using effective marginal taxe rate data)  

Input: base_for_reg.dta 
Output: table3.xls 
Reported in the paper: "Table 3 – Additional results, Effective Marginal Tax Rate"

*/  

cd $datapath
use base_for_reg, clear 


drop cty_*
qui tab pays, g(cty_) 

global name table3

global tax_var inter_linvemtr interdum_hines
global control inter_tarif inter_ldist inter_lgdpc  cty_* // country fixed effects in all regressions 
egen sc2=group(hs2 iso2) // sectorXcountry (allow to control for destination sector price index) 

global condition if ((type==1 & tot>p75) | type==0) // only large MNEs 
areg luv type $tax_var $control  $condition, a(fpt) cluster(pays)  
outreg2  type $tax_var $control  using  "$resultpath/$name.xls" ,  label e(all) nocons bdec(2) symbol($^{***}$, $^{**}$, $^{*}$)    replace 

global condition if ((type==1 & tot<p75) | type==0) // small MNEs 
areg luv type $tax_var $control  $condition, a(fpt) cluster(pays)  
outreg2  type $tax_var $control  using  "$resultpath/$name.xls" ,  label e(all) nocons bdec(2) symbol($^{***}$, $^{**}$, $^{*}$)    append

global condition if natact!="4" // exclude foreign MNEs 
areg luv type $tax_var $control  $condition, a(fpt) cluster(pays)  
outreg2  type $tax_var $control  using  "$resultpath/$name.xls" ,  label e(all) nocons bdec(2) symbol($^{***}$, $^{**}$, $^{*}$)    append

global condition if natact!="1" // exclude French MNEs 
areg luv type $tax_var $control  $condition, a(fpt) cluster(pays)  
outreg2  type $tax_var $control  using  "$resultpath/$name.xls" ,  label e(all) nocons bdec(2) symbol($^{***}$, $^{**}$, $^{*}$)    append

global condition if w==1 // homogeneous goods 
areg luv type $tax_var $control  $condition, a(fpt) cluster(pays)  
outreg2  type $tax_var $control  using  "$resultpath/$name.xls" ,  label e(all) nocons bdec(2) symbol($^{***}$, $^{**}$, $^{*}$)    append

global condition if n==1 // differentiated goods 
areg luv type $tax_var $control  $condition, a(fpt) cluster(pays)  
outreg2  type $tax_var $control  using  "$resultpath/$name.xls" ,  label e(all) nocons bdec(2) symbol($^{***}$, $^{**}$, $^{*}$)    append

global condition if ape<36  //  exclude wholesale firms 
areg luv type $tax_var $control  $condition, a(fpt) cluster(pays)  
outreg2  type $tax_var $control  using  "$resultpath/$name.xls" ,  label e(all) nocons bdec(2) symbol($^{***}$, $^{**}$, $^{*}$)    append

global control inter_tarif inter_ldist inter_lgdpc

global condition // no condition but destination*2digit-sector fixed effects 
reg2hdfe luv type $tax_var $control  $condition, id1(fpt) id2(sc2) cluster(pays) 
outreg2  type $tax_var $control  using  "$resultpath/$name.xls" ,  label e(all) nocons bdec(2) symbol($^{***}$, $^{**}$, $^{*}$)     append 
